﻿package com.rockylhc
{
	import flash.display.DisplayObject;
	import flash.display.Shape;
	import flash.display.Sprite;
	import flash.geom.Rectangle;
	/**
	 * ...
	 * @author Rocky
	 */
	public class DrawRectangle extends Sprite
	{
		private var rect:Shape;

		public function DrawRectangle(rWidth:Number, rHeight:Number, color:uint, opacity:Number):void
		{
			rect = new Shape();
			rect.graphics.beginFill(color,opacity);
			rect.graphics.drawRect(-rWidth*0.5,-rHeight*0.5,rWidth,rHeight);
			rect.graphics.endFill();
			addChild(rect);
			//return rect;
			
		}
	}
}


